# the minimum version of CMake.
cmake_minimum_required(VERSION 3.5.0)
project(cJSON)

set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR})

if(DEFINED PACKAGE_FIND_FILE)
    include(${PACKAGE_FIND_FILE})
endif()

add_library(cjson SHARED napi_cJSON.cpp)
#将三方库的头文件加入工程中
target_include_directories(cjson PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/cJSON/${OHOS_ARCH}/include)
target_link_libraries(cjson PUBLIC libace_napi.z.so)
#将三方库加入工程中
target_link_libraries(cjson PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/cJSON/${OHOS_ARCH}/lib/libcjson.so.1)
target_link_libraries(cjson PUBLIC libhilog_ndk.z.so)